<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>组件基础用法</title>
</head>

<body>


  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  <!-- import CSS -->
  <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css" />
  <!-- import JavaScript -->
  <script src="https://unpkg.com/element-plus"></script>

  <div id="app">
    <el-button @click="open">简单提示</el-button>
  </div>
  <script>
    const App = {
      setup() {
        const open = () => {
          console.log(ElementPlus);
          ElementPlus.ElMessage({
            message: "this is a message.",
            grouping: true,
            type: "success",
          });
        };
        return {
          open,
        };
      },
    };
    const app = Vue.createApp(App);
    app.use(ElementPlus);
    app.mount("#app");
  </script>
</body>

</html>